import { createRouter, createWebHistory} from 'vue-router'
import Home from '../views/home.vue'
import About from '../views/about.vue'
import Message from '../views/message.vue'
import My from '../views/my.vue'
import Compainon from '../views/compainon.vue'
import Mood from '../views/mood.vue'
// @ts-ignore
import Register from '../views/register.vue'
import Login from '../views/login.vue'
import Find from '../views/find.vue'
import UserInfo from '../views/userInfo.vue'
import addMood from '../views/addMood.vue'
import MoodDetail from '../views/moodDetail.vue'
import posts from '../views/posts.vue'
import addresses from '../views/addresses.vue'
export const constantRoutes = [
    { path: '/', component: Home },
    { path: '/about', component: About ,meta:{hideTabBar:false}},
    { path: '/message', component: Message },
    { path: '/my', component: My },
    { path: '/compainon', component: Compainon },
    { path: '/register', component: Register, meta: {hideTabBar:true}},
    { path: '/login', component: Login, meta: {hideTabBar:true}},
    { path: '/find', component: Find, meta: {hideTabBar:true}},
    { path: '/userInfo', component: UserInfo, meta: {hideTabBar:true}},
    { path: '/mood', component: Mood, meta: {hideTabBar:false}},
    { path: '/addmood', component: addMood,meta:{hideTabBar:true} },
    { path: '/mooddetail', component: MoodDetail,meta:{hideTabBar:true} },
    { path: '/posts', component: posts,meta:{hideTabBar:true} },
    { path: '/addresses', component: addresses,meta:{hideTabBar:true} },
]

const router = createRouter({
    history: createWebHistory(),
    routes: [...constantRoutes]
})
export default router;